/**
 * Warning: Do not change this file.
 */

#include <string>
#include <set>

#include "Rotor.hpp"
#include "Reflector.hpp"

/**
 * encode or decode a single character
 */
char encodeDecode(char inChar, Rotor &r1, Rotor &r2, Rotor &r3, const Reflector &ref);

/**
 * encode or decode a string
 */
std::string encodeDecode(const std::string &plain, Rotor &r1, Rotor &r2, Rotor &r3, const Reflector &ref);

/**
 * perform a brute force attack using knownPlaintext is the crib.
 * return an empty set if no solution could be found
 * otherwise, return one string each per solution, starting with three numbers indicating the positions of rotors, then three letters indicating the initial positions of rotors.
 * To give an example, "312XYZ" indicates rotor III is next to the input, rotor II is in the middle, rotor II is at the reflector. The initial positions of rotors would be X for rotor III, Y for rotor I, and Z for rotor II.
 */
std::set<std::string> bruteForce(const std::string &ciphertext, const std::string &knownPlaintext, Rotor &r1, Rotor &r2, Rotor &r3, const Reflector &ref);
